<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>宠物邻里互助平台</title>
    <style>
        /* 登录页面样式 */
        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background-color: #FFFDE7;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .container {
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            padding: 30px;
            width: 100%;
            max-width: 350px;
            text-align: center;
        }

        /* 其他样式省略... */
    </style>
</head>
<body>
<div class="container">
    <div class="logo">宠物邻里互助平台</div>

    <%-- 登录表单 --%>
    <form action="${pageContext.request.contextPath}/user/login" method="post">
        <div class="form-group">
            <label for="username">用户名</label>
            <input type="text" id="username" name="loginUserName" required>
        </div>

        <div class="form-group">
            <label for="password">密码</label>
            <input type="password" id="password" name="loginPassword" required>

            <%-- 验证码部分 --%>
            <img id="verifyId" src="${pageContext.request.contextPath}/user/verifyCode" width="220" height="60">
            验证码：<input type="text" name="verifyCode">

            <%-- 刷新验证码链接 --%>
            <a href="javascript:;"
               onclick="document.getElementById('verifyId').src='${pageContext.request.contextPath}/user/verifyCode?'+(new Date()).getTime()">
                换一张
            </a>
        </div>

        <button type="submit" class="btn">登录</button>

        <%-- 注册和忘记密码链接 --%>
        <div class="links">
            <a href="${pageContext.request.contextPath}/user/register">注册账号</a>
            <a href="#">忘记密码?</a>
        </div>
    </form>
</div>
</body>
</html>